<template>
  <div>
    <el-input v-model="url"></el-input>
    <McParentChildSelect :p-model.sync="form.pid" v-model="form.id" 
    :mc-parent-config="{'api':{'method':'post','url':url,'params':[],'fields':[],'limit':10},'pkField':'id','pkTextField':'activityName'}" 
    :mc-child-config="mcChildConfig"/>
    <el-button @click="print">打印</el-button>
    <el-button @click="change">改变</el-button>
    <el-button @click="hideshow">现因</el-button>
  </div>
</template>

<script>
import McParentChildSelect from './components/McParentChildSelect'
export default {
  data(){
    return {
      show:true,
      form: {},
      mcChildConfig:{
        'api':{'method':'post','url':'magical_lowcode/openapi/crud/activity_detail/list','params':[],'fields':[],'limit':10},
        'pkField':'id',
        'pkTextField':'activityName',
        /*父亲ID*/
        'parentField':"parentId"
      },
      url:"magical_lowcode/openapi/crud/activity/page"
    }
  },
  components:{
    McParentChildSelect
  },
  methods:{
      print(){
          console.log(this.form)
      },
      change(){
        this.$set(this.form,"id","2c9fe31d7c784b6c017c784f30230001")
        // this.form.id="2c9fe31d7c784b6c017c784f30230001";
      },
      hideshow(){
          this.show = !this.show;
      }
  }
}
</script>

<style>

</style>
